package com.zhejiangzhengyuan.municipal_common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.sql.Timestamp;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表，用于存储平台内所有用户数据
 * </p>
 *
 * @author linju
 * @since 2019-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="UserInfo对象", description="用户表，用于存储平台内所有用户数据")
public class UserInfo extends Model<UserInfo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "自增主键")
    private Long id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "用户昵称或用户别名")
    private String nickname;

    @ApiModelProperty(value = "用户性别，关联字典条目表")
    private String gender;

    @ApiModelProperty(value = "用户年龄")
    private Integer age;

    @ApiModelProperty(value = "用户工作工号")
    private String wordNum;

    @ApiModelProperty(value = "用户单位职位")
    private String position;

    @ApiModelProperty(value = "用户联系电话")
    private String phoneNum;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "若需要集成钉钉，且需要存储用户信息，以此id为关联")
    private String dingtalkUserId;

    @ApiModelProperty(value = "记录创建时间")
    private Timestamp createTime;

    @ApiModelProperty(value = "记录更新时间")
    private Timestamp updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
